module.exports = function(tplData) {
  let files = tplData.htmlWebpackPlugin.files;
  console.log(files);
  let scripts = [], styles = [];
  for (let c in files.chunks) {
    let e = files.chunks[c];
    scripts.push(`<script src="${e.entry}"></scripts>`);
  }
  for (let c of files.css) {
    styles.push(`<link rel="stylesheet" type="text/css" href="${c}" />`);
  }
  return `{% extends 'index.html' %} 
{% block title %}{{title}}{% endblock %} 
{% block headstyles %}
<!-- <link rel="stylesheet" type="text/css" href="../styles/index.css"> -->
${styles.join('')}
{% endblock %}
{% block content %}
{% endblock %}
{% block pjaxContainer %}
<x-star></x-star>
{% endblock %}
{% block bottomscipts %}
{% parent %}
${scripts.join('')}
{% endblock %}`
}